import React from 'react';
import ReactDOM from 'react-dom';


function connect(obj){
  return function (Com){
    class Temp extends React.Component{
      render(){
        return <Com name={obj.name}/>
      }
    }
    return Temp
  }
}

class App extends React.Component {
    constructor() {
        super();
        
    }
    render() {
      console.log(this)
        return <div className=''>

        </div>;
    }
}
App = connect({name:"珠峰"})(App)

ReactDOM.render(<App/>,document.getElementById('root'))